<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>print</title>
</head>
<body>
<!--<form action="print.php" method="POST">-->
<!--    <input type="text" name="num"><br/>-->
<!--    <input type="submit" name="jz" value="金字塔">-->
<!--    <input type="submit" name="kx" value="空心菱形">-->
<!--</form>-->
<script>
    for (let i = 0; i < 10; i++) {
        for (let j = 0; j < 10 - i - 1; j++) {
            document.write("&nbsp")
        }
        for (let k = 0; k < 2 * i - 1; k++) {
            document.write("*")
        }
        document.write("<br>")
    }
</script>
</body>
</html>